﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ewell.BizComponent.UI.Core.VievModel
{
    public class PayWayVm:ViewModelBase
    {
        /// <summary>
        /// 主键
        /// </summary>
        private string _no;
        public string no
        {
            get => _no; set
            {
                if (_no != value)
                {
                    _no = value;
                    OnPropertyChanged(nameof(no));
                }
            }
        }
        /// <summary>
        /// 支付方式编码
        /// </summary>
        private string _code;
        public string code
        {
            get => _code; set
            {
                if (_code != value)
                {
                    _code = value;
                    OnPropertyChanged(nameof(code));
                }
            }
        }
        /// <summary>
        /// 支付方式名称
        /// </summary>
        private string _name;
        public string name
        {
            get => _name; set
            {
                if (_name != value)
                {
                    _name = value;
                    OnPropertyChanged(nameof(name));
                }
            }
        }
        /// <summary>
        /// 余额
        /// </summary>
        private decimal? _balance;
        public decimal? balance
        {
            get => _balance;
            set
            {
                if (_balance != value)
                {
                    _balance = value;
                    OnPropertyChanged(nameof(balance));
                }
            }
        }
        /// <summary>
        /// 支付金额
        /// </summary>
        private decimal _amount;
        public decimal amount
        {
            get => _amount; set
            {
                if (_amount != value)
                {
                    _amount = value;
                    OnPropertyChanged(nameof(amount));
                }
            }
        }
        /// <summary>
        /// 接口标识
        /// </summary>
        private long? _interfaceId;
        public long? interfaceId
        {
            get => _interfaceId; set
            {
                if (_interfaceId != value)
                {
                    _interfaceId = value;
                    OnPropertyChanged(nameof(interfaceId));
                }
            }
        }
        /// <summary>
        /// 接口名称
        /// </summary>
        private string _interfaceName;
        public string interfaceName
        {
            get => _interfaceName; set
            {
                if (_interfaceName != value)
                {
                    _interfaceName = value;
                    OnPropertyChanged(nameof(interfaceName));
                }
            }
        }
        /// <summary>
        /// HIS扫码支付标志 1.需要弹出扫码框 0.不需要
        /// </summary>
        private string _hisScanPayFlag;
        public string hisScanPayFlag
        {
            get => _hisScanPayFlag; set
            {
                if (_hisScanPayFlag != value)
                {
                    _hisScanPayFlag = value;
                    OnPropertyChanged(nameof(hisScanPayFlag));
                }
            }
        }
        /// <summary>
        /// 是否需要弹出扫码框
        /// </summary>
        public bool hisScanPay
        {
            get
            {
                return "1".Equals(hisScanPayFlag);
            }
            set
            {
                if (value != "1".Equals(hisScanPayFlag))
                {
                    if (value == true)
                    {
                        hisScanPayFlag = "0";
                    }
                    else if (value == false)
                    {
                        hisScanPayFlag = "1";
                    }
                    OnPropertyChanged(nameof(hisScanPay));
                }
            }
        }
        /// <summary>
        /// 支付二维码
        /// </summary>
        private string _payQrCode;
        public string payQrCode
        {
            get
            {
                return _payQrCode;
            }
            set
            {
                if ((_payQrCode != value))
                {
                    _payQrCode = value;
                    OnPropertyChanged(nameof(payQrCode));
                }
            }
        }
        /// <summary>
        /// 默认支付方式
        /// </summary>
        private bool _isDefault;
        public bool isDefault
        {
            get => _isDefault;
            set
            {
                if (_isDefault != value)
                {
                    _isDefault = value;
                    OnPropertyChanged(nameof(isDefault));
                }
            }
        }
        /// <summary>
        /// 是否支付成功
        /// </summary>
        private bool? _paySuccess;
        public bool? paySuccess
        {
            get => _paySuccess; set
            {
                if (_paySuccess != value)
                {
                    _paySuccess = value;
                    OnPropertyChanged(nameof(paySuccess));
                }
            }
        }
        /// <summary>
        /// 支付失败原因
        /// </summary>
        private string _payErrorMsg;
        public string payErrorMsg
        {
            get => _payErrorMsg; set
            {
                if (_payErrorMsg != value)
                {
                    _payErrorMsg = value;
                    OnPropertyChanged(nameof(payErrorMsg));
                }
            }
        }
        /// <summary>
        /// 支付交易流水号
        /// </summary>
        private string _payTxnNo;
        public string payTxnNo
        {
            get
            {
                return _payTxnNo;
            }
            set
            {
                if (_payTxnNo != value)
                {
                    _payTxnNo = value;
                    OnPropertyChanged(nameof(payTxnNo));
                }
            }
        }
        /// <summary>
        /// 支付接口支付金额
        /// </summary>
        private decimal? _payAmt;
        public decimal? payAmt
        {
            get { return _payAmt; }
            set
            {
                if (_payAmt != value)
                {
                    _payAmt = value;
                    OnPropertyChanged(nameof(payAmt));
                }
            }
        }
    }
}
